// https://qc2rok.api.cloudendpoint.cn/pop

module.exports = async function(params, context){
  const rands = inspirecloud.db.table('rands');
  const resultFind = await rands.where().findOne();
  if(resultFind) {
      const resultDel = await rands.delete(resultFind);
      if(resultDel)return {code: 0, data:{value: resultFind.value}};
  }
  return {code: 1};
}